package com.example.mybatisdemo1.extend;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @Author: xiaoqiang
 * @Description:
 * @Date: 2020/9/11
 * @Version: 1.0
 */
@Target({ElementType.FIELD}) //作用目标为属性
@Retention(RetentionPolicy.RUNTIME) //注解保留策略
@Constraint(validatedBy = PhoneValid.class)
public @interface Iphone {

    String message() default "手机号验证错误";

    Class<?> [] groups() default {};

    Class<? extends Payload> [] payload() default {};

}
